package weibo.tools;

import java.awt.image.BufferedImage;
import java.io.File;
import java.util.List;

import javax.imageio.ImageIO;

import weibo.DecodeWeiboCaptcha;
import weibo.WeiboCrackerUtils;

public class DecodeTest {
	
	public static void main(String[] args) throws Exception {
		String name = "/Users/henrylian/Desktop/lab/show728.gif";
		BufferedImage img = ImageIO.read(new File(name));
		DecodeWeiboCaptcha.cleanImage(img);
		List<BufferedImage> list = DecodeWeiboCaptcha.getListSub(img);
		if (!list.isEmpty() && list.size() == 5){
			for(BufferedImage bi:list){
				System.out.println(WeiboCrackerUtils.getMostSimilarLetter(bi));
			}
		}
		
	}


}
